package com.panshi.modules.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 857
 * @since 2020-07-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QaQuestion对象", description="")
public class QaQuestion implements Serializable {

    private static final long serialVersionUID = 1L;

        @ApiModelProperty(value = "问答问题表ID")
        @TableId(value = "id", type = IdType.AUTO)
    private Long id;

        @ApiModelProperty(value = "作者ID")
        private Long userId;

        @ApiModelProperty(value = "问题类型ID")
        private Long typeId;

        @ApiModelProperty(value = "问题标题")
        private String question;

        @ApiModelProperty(value = "问题简介")
        private String introduce;

        @ApiModelProperty(value = "问题背景(内容)")
        private String content;

        @ApiModelProperty(value = "图片地址")
        private String photoPath;

        @ApiModelProperty(value = "创建时间")
        @TableField(fill = FieldFill.INSERT)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

        @ApiModelProperty(value = "发布时间")
        @TableField(fill = FieldFill.INSERT_UPDATE)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishTime;

        @ApiModelProperty(value = "回答数")
        private Integer answerNum;

        @ApiModelProperty(value = "阅读数")
        private Integer readNum;

        @ApiModelProperty(value = "收藏数")
        private Integer collectNum;

        @ApiModelProperty(value = "状态;0-下架,1-上架")
        private Integer state;

        @ApiModelProperty(value = "回答实体类")
        private QaAnswer qaAnswer;
}
